package de.chessgame.gamelogic.piece;

public enum Fraction {
	WHITE, BLACK;

	public static Fraction idToFraction(int id) {
		switch (id) {
		case 0:
			return WHITE;

		case 1:
			return BLACK;

		default:
			return null;
		}

	}

	public static int fractionToId(Fraction fraction) {
		switch (fraction) {
		case WHITE:
			return 0;

		case BLACK:
			return 1;

		default:
			return -1;
		}
	}
};
